home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 4
/
Gold Medal Software - Volume 4 (Gold Medal) (1994).iso
/
os2
/
mdf121.arj
/
MDFL121.ZIP
/
MPATCH.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-06-12
|
1KB
|
54 lines
#ifndef _MPATCH_H_
#define _MPATCH_H_
class MPatch {
unsigned long UnRegCrc;
char *FileBuffer;
short error;
char Doldfile[256];
char Dnewfile[256];
char Name[256];
unsigned long rate;
short Patch(FILE *fold,FILE *fnew,FILE *fdiff);
public:
MPatch();
void SetRate(short r=10);
short MDFPatch(char *diffile, char *oldfile, char *newfile);
char *LastError();
virtual void Show_start();
virtual void Show();
virtual void Show_end();
};
// *.MDF header info structure
struct MDF_header_info
{
char alg_ver[4]; // Algorithm version
char oldfilename[255]; // Old file name stored in MDF
char newfilename[255]; // New file name stored in MDF
char registeredto[255]; // Registered to
unsigned long oldfilecrc; // Old file CRC-32
short chunk_len; // Chunk lenght
unsigned long n_chunks; // Number of chunks
};
short readMDFhead(char *fn,MDF_header_info *hi); // Reads header from fn file
// Returns:
// 0 = File not found
// 1 = OK
// -1 = Not a MDIFF file
// -2 = Wrong MDF version
#endif